Processing Data From A CCD And CCD Imaging Apparatus To Correct Smearing Artifacts

ABSTRACT

A method of processing data from a CCD  1  having a line of light sensitive CCD elements is provided. The method comprises the steps of receiving measured illumination data readout from the CCD corresponding to measurements of charge associated with each element of the line of light sensitive CCD elements and removing from the measured illumination data in respect of each CCD element a component dependent upon illumination recorded by each of the other CCD elements through which the charge from the CCD element passed during the readout process.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of pending U.S. patent applicationSer. No. 12/364,381, filed Feb. 2, 2009, which is a continuation ofabandoned U.S. patent application Ser. No. 12/140,063, filed Jun. 16,2008, which in turn is a continuation of International PatentApplication PCT/IB2006/003621, filed Dec. 14, 2006 which designates theUnited States and claims priority from European Patent Application No.05257759.0, filed Dec. 16, 2005. The content of all prior applicationsis incorporated herein by reference.

FIELD OF THE INVENTION

The present invention relates to a method of processing data from a CCDand a CCD imaging apparatus. Throughout this document the acronym CCDstands for charge-coupled device.

BACKGROUND OF THE INVENTION

A CCD typically comprises an array of light sensitive CCD elements.These elements are usually formed of a semiconductor material andgenerate charge when exposed to light of an appropriate frequency. Inuse, the CCD elements are exposed to incident light for an exposure timeduring which charge accumulates at the CCD elements. The chargeaccumulated at a CCD element depends upon the exposure time andintensity of light incident. Subsequent measurement of the chargegenerated at each CCD element corresponds to a measurement of the lightincident on the CCD elements and allows an image to be recorded.

In order to measure the charge generated at each CCD element it iscommon to transport the charge away from the CCD elements to allowfurther exposures to be recorded while the recorded data is processed.This process of removing charge from the CCD and measuring it may bereferred to as the transport and readout process. In order to transportthe charge away it is common to draw the charge down from the array incolumns. Thus charge from an element at the top of a column is drawndown through lower CCD elements to be read during the transport andreadout process.

CCD devices are used in many imaging applications. In some, such asdigital cameras, the CCD is provided behind a shutter. However, inothers, such as luminescence and scintillation assay measurementsystems, a shutter is not provided. However, the absence of a shuttercan cause problems. In systems without a shutter, as the charge is drawndown through adjacent CCD elements during the transport and readoutprocess, the CCD elements are still subject to illumination. This tendsto increase the measured charge, particularly in cases where charge hasbeen drawn through several CCD elements during the readout process.Further, this additional exposure time is not uniform for each charge.Charges corresponding to CCD elements at the top of a column are drawndown through several CCD elements during the transport and readoutprocess whereas the charge associated with the lowest CCD element doesnot pass through any other CCD elements. As the illumination of CCDelements may not be uniform or constant, it is difficult to establishthe effect on a charge of having passed through other CCD elementsduring the transport and readout process.

This problem may be illustrated, by way of example, with reference toFIGS. 1A and 1B. FIG. 1A shows a CCD 1 comprising one hundred lightsensitive elements 10. The CCD is subject to illumination in 3 “spots”which fall on CCD elements marked A. During the transport and readoutprocess charge is transported from the CCD in vertical columns, when inthe configuration shown in FIG. 1B, leaving the CCD at the bottom of theCCD. The resulting image formed from the CCD data using standardprocessing is shown in FIG. 1B. As can be seen the three bright spots Ahave been recorded. However, there are also smears marked S which ratherthan showing unexposed areas show exposure. The smears S are due tocharge accumulated as the charge from the CCD elements above thebrightly exposed elements are drawn through the exposed elements duringthe transport and readout process. This problem of false image datacaused by the transport and readout process is referred to as smearing.

As mentioned above, once the charge has been drawn from the CCD incolumns a further exposure may begin. Alternatively, further current maybe drawn down the columns, possibly more rapidly, in order to further“clear” the sensor prior to the next exposure. This process is known asclearing.

Another problem that may distort the recorded illumination data, isresidual charge left during this clearing process. During clearing,current is drawn down the CCD in columns while the illumination stillpresent. Because, the lower CCD elements receive charge accumulated inthe CCD elements above them during the clearout process, the clearoutprocess tends to leave more charge in the lower CCD elements than in theupper CCD elements. In some circumstances, this accumulation of chargemay partially compensate for the smearing process described above. Anuneven distribution of charge at the beginning of the exposure may alsobe a result of an incomplete or uneven clearout process after which anirregular concentration of charge is left at the CCD elements.

A known method of processing data from a CCD to reduce the effect ofsmearing on an image is linear offset approximation. If, for example ina scintillation assay, the CCD is arranged to measure light emitted froman array of wells, a lower portion of the CCD may be directed to view anarea below the lowest well in the array and an upper portion of the CCDmay be directed to view an area above the highest well in the array.Because no light is expected to be generated outside of the wells, it isexpected that neither the upper nor lower portions of the CCD will beexposed. Due to the smearing effect described above, illumination datarelating to the upper portion of the CCD may show some exposure due tosmearing. In order to compensate for this artificial exposure, ameasurement is taken of the exposure of the upper and lower portions ofthe CCD that were expected to be unexposed. The difference in exposurebetween the upper and lower portions of the CCD due to smearing is thenmeasured and an offset is applied to the recorded data for each row ofCCD elements equal to the measured exposure difference divided by thenumber of CCD elements between the upper and lower portions andmultiplied by the number of rows of elements beneath that row.

The linear offset method assumes that the smearing is generated evenlythroughout the CCD and works well when the illumination of the CCD isrelatively uniform, for example when the wells of a scintillation assaymeasurement system are uniformly filled and each give out the sameamount of light. However, when the exposure is non-uniform, such as thatshown in FIG. 1A, the method tends to generate negative readings forthose cells below the bright points of illumination and fails to fullycompensate for the smearing above the bright points of illumination.

An object of the present invention is to provide a method of processingdata from a CCD and a CCD imaging apparatus that tends to bettercompensate for the effect of the smearing described above.

SUMMARY OF THE INVENTION

According to a first aspect of the present invention there is provided amethod of processing data from a CCD having a line of light sensitiveCCD elements, comprising the steps of:

receiving measured illumination data readout from the CCD correspondingto a measurements of charge associated with each element of the line oflight sensitive CCD elements; and

removing from the measured illumination data in respect of each CCDelement a component dependent upon the illumination recorded by each ofthe other CCD elements through which the charge from the CCD elementpassed during the readout process.

By removing components of the illumination recorded by other CCDelements, the problem of overcompensating in parts of the image andunder compensating in others may be reduced.

Preferably, the component of the illumination recorded by each of theother CCD elements removed from the CCD element is proportional to themeasured illumination from each of the other CCD elements through whichthe charge from the CCD element passed during the reading process.

In some embodiments the method may comprise the step of treating therecorded data for the lowest element, through which lowest elementcharge is drawn from the CCD, as equal to a calculated illumination forthe lowest CCD element. This may be done as it is sensible to assumethat there is no smearing in the recorded data associated with thelowest element because the charge associated with the lowest elementdoes not pass through any other CCD elements. The method may comprisethe step of subtracting an offset from the measured illumination dataassociated with the lowest CCD element before treating the resultingdata for the lowest CCD element as equal to a calculated illuminationvalue. The offset may compensate for clearing effects present in themeasured illumination data. The method may further comprise the steps ofcalculating, for each successive element of line of CCD elementsstarting with the second lowest CCD element, a calculated illuminationby subtracting a component of the calculated illumination associatedwith each of the lower CCD elements.

In other embodiments the step of removing from the measured illuminationdata in respect of each CCD element a component dependent upon theillumination recorded by each of the other CCD elements may comprise thestep of subtracting a quantity substantially equal to the integral ofthe product of a measured illumination data function and a kernelfunction over the region below the CCD element. The illuminationfunction is a function that represents the measured illumination data incontinuous form.

If the CCD elements do not have uniform sensitivity, the kernel functionmay be selected to compensate for non-uniform sensitivity of the line ofCCD elements.

In some cases the kernel function may be unknown. In some cases, thekernel function may be approximated to a constant kernel parameter, k.

In cases where the kernel parameter is unknown, the method may comprisethe step of determining the kernel parameter, k.

Preferably, the CCD comprises an array of CCD elements. The array of CCDelements may be formed of a plurality of columns of CCD elements ofwhich the line of CCD elements forms one. In some embodiments, thekernel parameter, k, may be calculated on a column by column basis. Inother embodiments, k may be determined for all CCD elements forming thearray.

Preferably, some CCD elements are selected as reference elements and anexpected illumination value is determined for these reference elements.The reference elements may be CCD elements that have been masked. Inthis case, it is expected that the reference elements will not have beensubject to illumination.

The step of determining the kernel parameter, k, may comprise the stepof

1. selecting a value of the kernel parameter;

2. processing illumination data according to a method described above inorder to generate calculated data, and

2. inspecting the calculated data in order to determine whether thecalculated illumination data corresponding to the reference elements hasthe expected illumination values.

The method may further include the step of varying the kernel parameterand repeating steps above until the calculated data relating to thereference elements has the expected values to within a predeterminedtolerance.

The method above may also comprise the step of selecting an initialvalue of the kernel parameter that is of larger magnitude than anexpected kernel parameter value. The expected kernel parameter value isan estimate or guess at the kernel parameter value that will yieldexpected values for the data corresponding to the reference elements.The method may then comprise the step of varying the kernel parameter tofind a kernel parameter of least magnitude to within an acceptabletolerance that yields the expected value for the reference elements towithin an acceptable tolerance. The kernel parameter may be varied inaccordance with known root finding methods such as bi-section,Newton-Raphson derivatives etc.

Where this method of determining the kernel value is performed on acolumn by column basis, the method may comprise the step of selectingone or more columns that have been exposed to a relatively high quantityof light and calculating the kernel parameter for these high signalcolumns in preference to other columns. Preferably, the method thencomprises the step of processing the remaining columns. In someembodiments, if the measured illumination data for the referenceelements within a column is within a tolerance range of the expectedvalue, no further processing of that column is conducted. In otherembodiments, if the measured illumination data for the referenceelements within a column is within a tolerance range of the expectedillumination values, the column is processed using a default value ofthe kernel parameter. The default value of the kernel parameter may be avalue of the kernel parameter determined from processing of the kernelparameters calculated during processing of the high signal data columns.

Another, method of calculating how much of a component of the other CCDelements should be removed from the illumination data, is a matrixtreatment. If data associated with each column of the CCD array istreated as a vector, then the illumination data generated by the CCDincluding the smearing effect may be treated as the actual illuminationof the CCD, as a vector, acted on by a matrix operator which representsthe process of measurement by the CCD. In some embodiments, the step ofremoving from the measured illumination data in respect of each CCDelement a component dependent upon the illumination recorded by each ofthe other CCD elements may comprise the step of treating theillumination data from a line of CCD elements as a vector andpre-multiplying the vector by a matrix. Preferably the matrix is anapproximation of the inverse of a matrix operator that represents themeasurement of illumination by the CCD.

Preferably, the approximation of the inverse of the matrix operator isobtained by inverting an approximation of the matrix operator. In someembodiments, the inversion of the matrix operator is performed using anumerical method, such as singular value decomposition.

In one representation of the matrix operator, the matrix operator is anN by N matrix, where N is equal to the number of CCD elements in acolumn, and the diagonal elements of the matrix contain constantsassociated with exposure time. In some embodiments, the diagonalelements each contain a single constant associated with exposure time.Preferably, the elements of the matrix operator below the diagonalcontain constants associated with smearing due to the read-out process.In some embodiments, the elements of the matrix below the diagonalcontain a single constant associated with smearing during readout.Preferably, elements of the matrix above the diagonal contain constantsassociated with pre-exposure of the CCD elements during clearing. Insome embodiments, the elements of the matrix above the diagonal eachcontain a single constant associated with pre-exposure of the CCDelements during clearing.

In some methods, the matrix operator is estimated based on knowledge ofthe exposure time of the CCD, the read-out time of the CCD and theclearing patterns of the CCD.

Preferably, the data is processed based on an estimated matrix operatorand then data associated with reference elements is examined to seewhether the data associated with the reference elements is within atolerance range of an expected value. In an iterative method, if theprocessed data associated with the reference elements is not within thetolerance range, the matrix operator is adjusted and the process isrepeated until the data associated with the reference elements is withinthe tolerance range.

In some embodiments, an initial matrix operator is estimated and theabove iterative method is used with a vector representing illuminationdata in which each element of the column vector corresponds to aweighted average of data from CCD elements in an associated row of theCCD. In some embodiments, the weighted average is calculated so as tolend greater weight to data, associated with columns of the CCD, whichhave significant smearing.

In some embodiments, the matrix operator may be adjusted to compensatefor non-uniform sensitivity of the CCD elements by multiplying each rowof the matrix operator by a sensitivity factor.

A CCD imaging apparatus may be provided comprising:

a CCD having a line of light sensitive CCD elements;

measuring means for measuring charges associated with the CCD elementsto generate measured illumination data; and

processing means for removing from each element of the measuredillumination data in respect of each CCD a component of the illuminationrecorded by each of the other CCD elements through which the charge fromthe CCD element passed during the readout process.

Optional features of the first aspect of the present invention describedabove, may also optionally be features of the second aspect of thepresent invention.

BRIEF DESCRIPTION OF THE DRAWINGS

Methods of processing data from a CCD and a CCD imaging apparatus willnow be described, by way of example only, with reference to theaccompanying drawings in which:

FIG. 1A shows a CCD having CCD elements, upon a few of which a brightlight is incident;

FIG. 1B illustrates smearing of the image recorded by the CCD shown inFIG. 1;

FIG. 2 schematically shows a CCD imaging apparatus embodying the presentinvention;

FIG. 3 is a graph showing how the varying the value of the kernelparameter, k, affects the data produced by a method of the firstembodiment; and

FIG. 4 is a graph showing the effect of the linear offset method and themethod of the first embodiment of the present invention on simulatedsmeared image data.

DETAILED DESCRIPTION OF THE INVENTION

FIG. 2 shows a CCD imaging apparatus comprising a CCD 1, which has anarray of CCD elements 10. The CCD is under constant illumination and isnot provided behind a shutter. The CCD 1 is connected to measuring meansin the form of an analogue to digital converter (ADC) 2 for measuringcharges accumulated at the CCD elements 10. In general, the measuringmeans may be formed as part of the CCD or may be a separate device. TheADC 2 is connected to processing means in the form of a processor 3 forprocessing image data received from the ADC 2.

Image data generated by the ADC 2 is subject to distortion due tosmearing and due to charge density differences at the start of the CCDexposure caused by clearing. The effect of smearing and clearing on thedata depends to some extent on the relative duration of the exposure,readout and clearing of the CCD 1. In this embodiment, the exposure timeis around 400 ms, the readout time is around 600 ms and the clearingtime is around 100 ms.

Smearing tends to become a greater problem as the readout time becomeslarge compared with the exposure time. Thus if the exposure time isreduced to 4 ms to increase the cycle time of the CCD, smearing effectswould dominate the image data produced by ADC 2. A similar effect occursif the readout time is increased, perhaps to reduce noise introduced tothe image signal during readout. On the other hand increasing theexposure time relative to the readout time, reduces the relative effectof smearing on the resulting image.

The processor 3 may process data according to either of the followingmethods to at least partially compensate for distortion due to smearingor clearing.

First Embodiment

Consider a single column of the CCD elements 10 in the CCD 1 that areinitially subject to illumination for an exposure time. The CCD elementsare arranged such that, during a transport and read out process, currentassociated with each CCD element is drawn down the column and out viathe lowest element. In this case, if the CCD elements are numbered fromthe bottom up, charge from the yth CCD element passes through the y−1CCD elements below it during the transport and read out process.Illumination of this column of CCD elements is in general non-uniformand may be represented by an illumination function X(y). In view of theabove, the recorded illumination for the yth CCD element is due toillumination of the yth CCD element during the exposure time and alsodue to illumination as the charge associated with the yth CCD elementpasses through y−1 lower CCD elements during the transport and read outprocess. For a large number of CCD elements

I(y) = X(y) − k∫₀^(y)X(z)z

where I(y) is a recorded illumination function representing datarecorded by ADC 2 and k is the parameter known as the kernel parameter.The function X(y) represents illumination during the exposure time. Thekernel, k, may, more generally, be a function that varies along thecolumn of CCD elements, for example where the readout process isnon-uniform. In the case where the kernel varies spatially, the kernelfunction should be taken inside the integral. The integral termrepresents charge accumulated as the charge associated with the CCDelement at y passes through lower CCD elements. Because we expect thefinal recorded data to represent a sum of the illumination duringexposure and accumulation as the charge passes through the elementsbelow it, it can be seen that k must be a negative constant in thepresent case.

The above equation may be rearranged as follows:

X(y) = k∫₀^(y)X(z)z + I(y)

This equation is recognisable as a volterra integral equation for whichthere exist standard solutions. Alternatively, the problem may becouched in discrete terms leading to the following equation:

$I_{y} = {X_{y} - {K{\sum\limits_{i = o}^{y - 1}X_{i}}}}$

Of course, the only known function in the above equations is therecorded CCD image data I(y) or I_(y). However, inspection of theseequations shows that where y=0 in the continuous case or where y=1 inthe discrete case, the sum or cumulative integral vanishes indicatingthat there is no smearing in respect of the lowest CCD element. This isbecause charge from the lowest element does not pass through any CCDelements below it. Looking particularly at the discrete equation one cantherefore start by setting X₁ equal to and estimate that the nextillumination, X₂, will be equal to:

X ₂ =I ₂ −kX ₁.

It can be seen that the illumination function, X_(y), may be, therefore,be estimated iteratively, by repeating the above steps for X₃ X₄ . . .X_(n) where n is equal to the number of CCD elements in the column ofthe CCD. At this stage, the only remaining unknown is, therefore, thekernel parameter.

A method of processing data according to the first embodiment of thepresent invention consists of the steps of assuming that the lowest CCDelement of a column of CCD elements does not contain any smearing,removing from the measured data associated with the CCD element abovethe lowest element a weighted component of the data corresponding thelowest CCD element, removing from the 3^(rd) highest CCD element aweighted component of the recorded data relating to the lowest CCDelement and a weighted component of the calculated illumination data forthe intermediate CCD element, and so on until an estimate of theillumination function has been calculated for all CCD elements. This, ofcourse, could be repeated on a column by column basis for an array ofCCD elements.

The next step is the determination of k, the kernel parameter. FIG. 3shows the effect of applying a method according to the first embodimentto simulated measured image data that includes the effect of smearing.The measured image data is shown in FIG. 3 by a dotted line marked“image”. This image data was generated for a CCD comprising a column ofCCD elements (pixels) that was subject to illumination in spots. Lookingat the graph it can be seen that the spots have produced sharp pointlike peaks of high illumination.

In order to allow an appropriate value of k to be determined, the upperedge of the CCD used to produce this image data was masked. The maskedCCD elements for which an expected illumination is known, may bereferred to as reference elements. Looking at the graph, where the imagedata forms a substantially flat line beyond columnar pixel index 250 theflat line represents the reference pixels that were subject to noillumination. However, looking at the graph it can be seen that, due tosmearing, the relative illumination of the reference pixels is in factabove zero and somewhere beyond 0.2. Application of the above methodusing a value of k=−0.01 can be seen to reduce the effect of smearing,lowering the height of the flattened end section of the image date to arelative illumination below 0.2. However, a better fit appears to beprovided by lowering the kernel parameter further to −0.002 in whichcase the flattened end portion is bought to nearly zero relativeillumination. This corresponds to the expected zero illumination due tomasking of the CCD elements.

Looking at the results for K=−0.005 and K=−0.020 the effect of selectinga kernel parameter of too large a magnitude (too negative) can be seen.When too large a magnitude of the kernel parameter is selected theresulting image data tends to be distorted and negative illuminationvalues appear.

A method of determining an appropriate value of the kernel parameter kis therefore to select an area of the CCD for which illumination isknown (select reference elements) and to perform image processingaccording to the above described method using different values of kuntil the resulting data for the reference elements matches the expectedillumination value to within a required tolerance.

Looking at FIG. 3 it can be seen that for values of k that are toonegative, the flattened end portion of the calculated data still tendstowards zero relative illumination. The optimal value of k thereforeappears to be the value of smallest magnitude that yields near zerorelative illumination for the reference elements. This may be done byinitially selecting a kernel parameter that is too large in magnitude(too negative) and then adjusting the kernel parameter to find a minimummagnitude of k that yields an acceptable solution. This is effectively aproblem of finding a root of an equation and may be solved usingconventional methods such as bi-section, Ridder's algorithm,Newton-Raphson derivatives or Brent's method (vanWijngaarden-Dekker-Brent)

A further development of this method involves the use of referenceelements provided at the bottom of the CCD as well as at the top. TheCCD may be subject to the effects of residual exposure of the CCDelements from clearing. This effect may be seen in the lowest elementsof the CCD columns where no smearing is present. In order to compensatefor the clearing, an offset may be applied to the data for a column ofCCDs to bring the reference elements at the bottom of the CCD to thereexpected value before applying the method described above.

Application of the above method has been found to be very effective.FIG. 4 is a graph showing simulated smeared image data, image datacalculated using the integral algorithm described above and datacalculated using the linear approximation method (linear algorithm)described in the introduction to this application. Again the smearedimage data has been formed for a CCD that is masked at its upperelements. Thus, the relative signal for columnar pixels above 250 shouldbe zero representing no recorded illumination. Looking at the smearedimage data it can be seen that due to smearing the recorded relativesignal for columnar pixels above 250 is just below 0.1. This situationis somewhat improved by the linear approximation method. However,looking at the data produced by the integral algorithm it can be seenthat this data produces a much flatter background and avoids negativesignal readings that are produced by the linear algorithm (see forexample between columnar pixels 50 and 125).

In a variant of the first embodiment, if the CCD is used for multipleexposures then the value of the kernel parameter calculated for earlierexposures may be used to estimate the kernel parameter for laterexposures. If the exposure times for the different exposures vary, thevalue of the kernel parameter, k, may be scaled by a factor proportionalto the exposure times and readout times of the different exposures.

The method of the first embodiment has the potential, in somecircumstances, to yield negative data values. To compensate for this,the final image data may have an offset added to it and be rescaledbefore display to a user to prevent clipping of the image data duringdisplay.

Second Embodiment

In a second method embodying the present invention, the recordedillumination data, which represents the actual illumination of the CCD,is treated as original illumination data acted on by a matrix operator.The recorded data may be arranged as a column vector I. Correspondingly,the original illumination data may be arranged as a column vector X. Therecorded illumination data is regarded as the original illumination dataacted on by a matrix operator, M, that represents the action of the CCDduring pre-exposure, clearing exposure and read out. Thus

{right arrow over (I)}=M·{right arrow over (X)}

In the absence of smearing or clearing effects the original illuminationdata, X, would be equal to the recorded illumination I multiplied by aconstant relating to exposure. Thus the diagonal elements of the matrixoperator M include a constant relating to the exposure time, E. Otherelements in the matrix are included to represent smearing and clearingeffects. In general, the entries for clearing effects may be representedby constants C_(ij). However, if the constants associated withpre-exposure due to clearing may be represented by a single constant Cand terms relating to smearing are represented by constant R then theform of the matrix M is:

$M = \begin{pmatrix}E & C & C & \ldots & C \\R & E & \; & \; & \vdots \\R & \; & \ddots & \; & C \\\vdots & \; & \; & E & C \\R & \ldots & R & R & E\end{pmatrix}$

As discussed in the introduction to this application the pre-exposuredue to clearing may be irregular due to incomplete clearing or possiblydue to significant pauses during the clearing process. In thesecircumstances and as mentioned above, the constant C in the matrix M maynot be a satisfactory approximation and it will be appropriate to usedifferent values C_(ij). If the CCD elements in a column are not ofuniform sensitivity this may be compensated for by multiplying the rowsof the Matrix M by appropriate sensitivity factors.

If the above matrix with a clearing constant C is substituted into thematrix equation above and multiplied out then the result is the discreteequation formulated earlier in respect of the method of the firstembodiment except for the presence of terms involving constant C whichrelate to clearing. Thus, if terms involving C are small enough to beignored the solution of the above equation will produce exactly the sameresult as the integral method of the first embodiment.

The matrix M may be written in lower diagonal form by representing M asthe sum of two matrices as follows:

     M = M^(LD) + C $M = {\begin{pmatrix}{E - C} & 0 & 0 & \ldots & 0 \\{R - C} & {E - C} & \; & \; & \vdots \\{R - C} & \; & \ddots & \; & 0 \\\vdots & \; & \; & {E - C} & 0 \\{R - C} & \ldots & {R - C} & {R - C} & {E - C}\end{pmatrix} + \begin{pmatrix}C & C & \ldots & C & C \\C & C & \; & \; & C \\\vdots & \; & \ddots & \; & \vdots \\C & \; & \; & C & C \\C & C & \ldots & C & C\end{pmatrix}}$

If we insert this representation of the Matrix, M, and multiply matricesout, we arrive at:

I=MX=(M ^(LD) +C)X=M ^(LD) X+CX

The above equation, where pre-clearing is uniform i.e. C_(ij)=C, may besolved by subtracting an offset from each column and the use of themethod of the first embodiment. This offset can be estimated usingvarious methods. If, for example, the lowest CCD elements are referenceelements that are not subject to exposure then no smearing effect willbe present. The difference between the recorded value and the expectedzero illumination is therefore due to clearing effects and may be usedto calculate the offset C. Having determined C in this manner this valuemay be subtracted from all the column data before implementing themethod according to the first embodiment.

A second special case exists when the effect of read out and preexposure constants are approximately equal. In this case it can be seenfrom the equation above that the effect of smearing and clearing canceleach other out and the lower diagonal matrix becomes diagonal. In thissituation the solution of the above equation lies in simply removing anoffset from each column as described above to compensate for thepresence of C in the diagonal terms of the matrix.

It has been found that in practice even if the assumption of the uniformpre-clearing (C=constant) is not valid the application of the integralalgorithm according to the first embodiment with the offset describedabove is likely to give a good first order solution of the aboveequations with relatively little computational effort. Application ofthis method therefore produces data with substantially less smearing andclearing distortion.

In the event that the value of C may not be treated as a constant it hasto be replaced by constants C_(IJ), more sophisticated methods may beemployed. Returning to the matrix equation

{right arrow over (I)}=M·{right arrow over (X)}

we may premultiply both sides of the equation by the inverse of matrixM. The resulting equation is:

M ⁻¹ ·{right arrow over (I)}=M ⁻¹ ·M·{right arrow over (X)}={right arrowover (X)}

Thus as would be expected, the actual illumination data may be recoveredif we can apply an inverse of the matrix M, which represents action ofthe CCD, to the measured illumination data. Applying this idea presentstwo problems:

determining the matrix M from knowledge of CCD operating conditions andwithout prior knowledge of illumination X, and

inversion of the matrix M.

Inversion of the matrix M may pose particular problems when the CCD islarge and consequently the matrix M has a large number of elements. Theinversion of the matrix M, once it has been determined, may beaccomplished by various known methods. One preferred method is that ofsingular value decomposition. This method has the advantage that theuser may determine when the inversion is likely to become numericallyunstable and make a good approximation to the solution.

The structure of the matrix M, may be determined as follows. Initialestimates may be determined based on knowledge of the time taken by theCCD during exposure, readout and clearing. These estimates are likely toallow a good first approximation to the structure of the matrix M, usinga formulation similar to that described above.

The matrix, M, may then be adapted by applying the above method tomeasured illumination data for a known illumination pattern. Iterativeadaptation of the matrix M based on inspection of the calculatedillumination data and the known illumination pattern allows refinementof the matrix M to an acceptable approximation.

The above method could be applied in a column by column approach todetermine a matrix relating to each column of the CCD. An alternativeapproach is to apply the above method to more than one column of a CCDat once.

If the original illumination data and recorded illumination data areconsidered for multiple columns at the same time, a weighted averageillumination data column vector and weighted average recordedillumination data vector may be formed. The equation I=M·X may bewritten in the form:

Σ_(i=0) ^(N) w _(i) {right arrow over (I)} _(i)=Σ_(i=0) ^(N) w _(i)M·{right arrow over (X)} _(i)

In the above equation the summations are carried over the N columns ofthe image and i represents a row index. The term w is a weightingfactor. If it is assumed that the effect of clearing and readout is thesame for each column then M is a constant that may be taken outside thesummation. At the same time both sides of the equation are multiplied bythe inverse of the matrix to arrive at the following equation:

${M^{- 1} \cdot {\sum\limits_{i = 0}^{N}{w_{i}{\overset{->}{I}}_{i}}}} = {\sum\limits_{i = 0}^{N}{w_{i}{\overset{->}{X}}_{i}}}$

In order to obtain a reasonable approximation of the matrix M, thefollowing method is employed using a CCD with masked reference elementsat the top and bottom of each column of CCD elements. The weightingfactor w is adjusted to produce the sum of those columns which have astrong smear. This may be determined for example by looking at the datacorresponding to reference elements at the top of the CCD columns. Theleft hand sum is then computed to arrive at an averaged column imagecontaining a significant amount of smeared data. Using this averagedcolumn data an estimate of the transform matrix M is made. This matrixis then inverted and calculated illumination data produced. Thecalculated data corresponding to the reference elements at the top andbottom of the column is then inspected. In this example, data for thereference elements should show no exposure due to masking of the CCD.If, looking at data relating to the masked region at the top of thecolumns of the CCD, the data is not close to zero then the smearing hasnot been corrected properly. In this case it is necessary to adjust thevalue of the constant R in the matrix. Similarly, if, looking at datacorresponding to CCD elements in the masked region at the bottom of theCCD, the measured average data does not have a zero mean value thenthere are still effects of clearing present and the terms C_(IJ) in thematrix need to be adjusted. Once these adjustments have been made a newinverse matrix is calculated and recorded image data is processed againand the values associated with reference elements compared again. Thisprocess is repeated in an iterative manner until a stable solution isreached.

1. A method of processing data from a CCD having at least one line oflight sensitive CCD elements, comprising the steps of: receivingmeasured illumination data readout from the CCD corresponding to ameasurements of charge associated with each element of the line of lightsensitive CCD elements; and removing from the measured illumination datain respect of each CCD element a component dependent upon theillumination recorded by each of the other CCD elements through whichthe charge from the CCD element passed during the readout process
 2. Themethod according to claim 1, wherein the method further comprises thestep of treating the illumination recorded for a lowest element, throughwhich element charge is drawn from the line of CCD elements, as equal toa calculated illumination for the lowest CCD element.
 3. The methodaccording to claim 2, wherein the method further comprises the steps ofcalculating, for each successive element starting with the second lowestCCD element, a calculated illumination by subtracting a component of thecalculated illumination associated with each of the lower CCD elements.4. The method according to claim 3, wherein the method comprises thestep of subtracting an offset from the measured data associated with thelowest CCD element before treating the resulting data for the lowest CCDelement as equal to the calculated illumination for the lowest CCDelement.
 5. The method according to claim 1, wherein the CCD comprisesan array of CCD elements.
 6. The method according to claim 5, whereinthe array of CCD elements forms a plurality of columns of which the lineof CCD elements is one.
 7. The method according to claim 1, wherein thestep of removing a component dependent upon the illumination recorded byother CCD elements comprises the step of treating the illumination datafrom the line of CCD elements as a vector and pre-multiplying the vectorby a matrix.
 8. The method according to claim 7, wherein the matrix isan approximation of the inverse of a matrix operator that represents themeasurement of illumination by the CCD.
 9. The method according to claim8, wherein the approximation of the inverse of the matrix operator isobtained by inverting an approximation of the matrix operator.
 10. Themethod according to claim 9 wherein the matrix operator is estimatedbased on knowledge of the exposure time of the CCD, the read-out time ofthe CCD and clearing patterns of the CCD.
 11. The method according toclaim 8, wherein some CCD elements are selected as reference elementsand expected illumination values are determined for these referenceelements.
 12. The method according to claim 11, further comprising thesteps of 1) processing data using the estimated matrix to generatecalculated illumination data, and 2) inspecting the calculatedillumination data to see if the data corresponding to the referenceelements has the expected illumination values.
 13. The method accordingto claim 12, further comprising the steps of: 3) varying the estimatedmatrix 4) repeating steps 1 to 3 until the calculated data associatedwith the reference elements has the expected illumination values towithin a predetermined tolerance.
 14. The method according to claim 13,wherein the CCD comprises an array of CCD elements arranged in rows andcolumns, and steps 1 to 3 are performed using a vector corresponding toa weighted average of data from CCD elements in an associated row of theCCD.
 15. The method according to claim 14, wherein the weighted averageis calculated so as to lend greater weight to data corresponding tothose columns of the CCD that have been subject to relatively highquantities of light.
 16. The method according to claim 14, wherein thematrix operator is adjusted to compensate for non-uniform sensitivity ofthe CCD elements by multiplying each row of the matrix by a sensitivityfactor.
 17. The method according to claim 1, further comprising the stepof removing from each CCD element a quantity approximately equal to theintegral of the product of a measured illumination data function and akernel function over the region below the CCD element.
 18. The methodaccording to claim 17, wherein the kernel function is selected tocompensate for non-uniform sensitivity of the line of CCD elements. 19.The method according to claim 17, wherein the kernel function is aconstant kernel parameter.
 20. A non-transitory computer readable mediumhaving stored thereon a computer program comprising a set ofinstructions that, when run on processing means, performs a methodaccording to claim 1.